package com.ethan.blog.pojo.dto.user;

import com.ethan.blog.common.constant.MessageConstant;
import com.ethan.blog.common.constant.StatusCodeConstant;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author: Ethan
 * @Time: 2024/5/25 14:41
 * @description: 用户注册数据模型类
 */
@Schema(description = "用户注册数据模型类")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserRegisterDTO extends UserDTO implements Serializable {
    @Schema(description = "传输明文，默认随机")
    @Pattern(regexp = StatusCodeConstant.LOGIN_PASSWORD_PATTERN, message = MessageConstant.PASSWORD_INVALID)
    private String password;
}
